import service from '@/utils/request.js'
// 将所有的针对course的请求，都封装到一个对象courseApi中
// courseApi封装了所有后端操作的接口（路径）

const chartApi = {//api是前端连接后端的接口
    selectCoachCount() {
        return service.get('/chart/selectCoachCount')
    },
    selectUserTotal() {
        return service.get('/chart/selectUserTotal')
    },
    selectCoachTotal() {
        return service.get('/chart/selectCoachTotal')
    },
    selectCourseTotal() {
        return service.get('/chart/selectCourseTotal')
    },
    selectReserveTotal() {
        return service.get('/chart/selectReserveTotal')
    },
    selectHotCourse() {
        return service.get('/chart/selectHotCourse')
    },
    selectUserCount(date) {
        return service.get('/chart/selectUserCount', {params: {date}})
    },
    selectReserveCount(date) {
        return service.get('/chart/selectReserveCount', {params: {date}})
    }
}

export default chartApi

